package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
	"tFilm4/internal/model"
	"tFilm4/internal/model/entity"
)

type CreateSessionReq struct {
	g.Meta       `path:"/movieSession/create" method:"post" tags:"MovieSessionService" summary:"添加新场次"`
	MovieId      int64             `v:"required#请输入电影编号"`
	HallId       int64             `v:"required#请输入影厅编号"`
	StartTime    *gtime.Time       `v:"date#请确保开始时间字段为日期类型格式|required#请输入开始时间"`
	EndTime      *gtime.Time       `v:"date#请确保结束时间字段为日期类型格式|required#请输入结束时间"`
	SessionPrice float64           `v:"required#请输入价格"`
	SeatTable    *entity.SeatTable `v:"required#请输入座位表信息"`
}

type CreateSessionRes struct{}

type GetSessionListReq struct {
	g.Meta    `path:"/movieSession/list" method:"post" tags:"MovieSessionService" summary:"获取场次列表"`
	PageSize  int `v:"required#请输入页大小|integer"`
	PageNum   int `v:"required#请输入页号|integer"`
	SearchKey string
}
type GetSessionListRes struct {
	MovieSessionInfo  []model.SessionInfo `json:"list" dc:"影厅列表"`
	MovieSessionCount int                 `json:"count" dc:"总条数"`
}

type GetSessionListByHallTimeReq struct {
	g.Meta    `path:"/movieSession/hallTime/list" method:"post" tags:"MovieSessionService" summary:"查看影厅一段时间内的场次"`
	StartTime *gtime.Time `v:"date#请确保开始时间字段为日期类型格式|required#请输入开始时间"`
	EndTime   *gtime.Time `v:"date#请确保结束时间字段为日期类型格式|required#请输入结束时间"`
	HallId    int64       `v:"required#请输入影厅编号"`
}

type GetSessionListByHallTimeRes struct {
	MovieSessionInfo  []model.SessionInfo `json:"list" dc:"影厅列表"`
	MovieSessionCount int                 `json:"count" dc:"总条数"`
}

type GetSessionListByMovieTimeReq struct {
	g.Meta    `path:"/movieSession/movieTime/list" method:"post" tags:"MovieSessionService" summary:"获取电影一段时间的场次"`
	StartTime *gtime.Time `v:"date#请确保开始时间字段为日期类型格式|required#请输入开始时间"`
	EndTime   *gtime.Time `v:"date#请确保结束时间字段为日期类型格式|required#请输入结束时间"`
	MovieId   int64       `v:"required#请输入电影编号"`
}

type GetSessionListByMovieTimeRes struct {
	MovieSessionInfo  []model.SessionInfo `json:"list" dc:"场次列表"`
	MovieSessionCount int                 `json:"count" dc:"总条数"`
}

type GetSessionByIdReq struct {
	g.Meta `path:"/movieSession/id" method:"post" tags:"MovieSessionService" summary:"根据Id获取场次信息"`
	SessionId int64 `v:"required#请输入场次编号"`
}
type GetSessionByIdRes struct {
	MovieSessionInfo model.SessionInfo `json:"info" dc:"场次信息"`
}